The Dynamic Host Configuration Protocol (DHCP) is specifically defined in Request For Comment 2131 (a.k.a., RFC 2131), RFC 2132 as well as other related RFCs. In general, DHCP enables host clients on an IP (Internet Protocol) network to request and obtain configuration information from a DHCP configuration server. Perhaps the most significant configuration option supported by the DHCP protocol is the dynamic allocation of IP addresses to clients. This option affords flexibility to network users, reduces the overall maintenance associated with manually administering an IP network, and supports reusability of network addresses. Thus, DHCP is particularly well-suited for use in connection with laptop computers that are used in several different networks, and use in large networks in which keeping track of a large number of IP addresses would otherwise be difficult.
There are two primary features of DHCP. First, DHCP defines mechanisms through which clients can be assigned an IP address for a finite lease period, allowing for reassignment of the IP address to another client later after the lease has expired. Second, DHCP provides the mechanism for a client to gather other IP configuration parameters it needs to operate in a TCP/IP (Transmission Control Protocol/Internet Protocol) network.
The three techniques supported by the DHCP protocol to assign IP addresses to clients include “automatic allocation” in which a DHCP server assigns a permanent IP address to a client, “manual allocation” in which a client's IP address is manually chosen by a network administrator and the DHCP server conveys the IP address to the client, and “dynamic allocation” in which a DHCP server assigns an IP address to the client for a limited period of time (e.g., a lease period).
In a typical session, the client sends a DHCPDISCOVER message to obtain an IP address from a server. The client optionally includes an IP address in the message that it would like to be assigned. The server responds with a DHCPOFFER message that includes the IP address to be assigned to the client and other parameters such as a netmask.
After the client receives the DHCPOFFER message from the configuration server, the client responds with a DHCPREQUEST message that includes a “server identifier” value. Inclusion of the server identifier value indicates to the configuration server that the client has accepted its offer. The message also indicates to other servers that the requesting client has declined their offers. The selected server receives the DHCPREQUEST message and then responds with a DHCPACK message including appropriate configuration parameters. If the server has already allocated the IP address requested by the client, the server will send a DHCPNAK instead of a DHCPACK to the client. A client may perform a check routine to verify that the IP address is correct by implementing ARP (Address Resolution Protocol) on a local network segment.
If the client detects that the address is already in use on the local network segment, the client sends a DHCPDECLINE message to the server and initiates the request process again. If the client receives a DHCPNAK (e.g., no acknowledgment) from the DHCP server after sending the DHCPREQUEST, the client will also send a request again.
After being assigned a lease for an IP address, if the client no longer needs an IP address, the client may send a DHCPRELEASE message to the DHCP server indicating that the IP address is no longer needed. Alternatively, a client may extend a lease time of an IP address by generating an appropriate request.
Most computer devices perform a routine exploiting the DHCP protocol discussed above at power-up to automatically retrieve an IP address and connect themselves to a network. For example, a computer device that must lease or be dynamically assigned an IP address may exploit a routine at power-up to automatically enable appropriate network interfaces and thereafter retrieve an IP address from a DHCP server for connecting and communicating over a corresponding network to which the computer device is attached. Thus, in such instances, a user need not manually request assignment of an IP address to connect to a network because the computer device is programmed to automatically perform such a routine at power-up.